3.2.8 \(\int \frac {(c+d x)^3}{a+i a \sinh (e+f x)} \, dx\) [108]

Optimal. Leaf size=132 \[ \frac {(c+d x)^3}{a f}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}-\frac {12 d^2 (c+d x) \text {PolyLog}\left (2,-i e^{e+f x}\right )}{a f^3}+\frac {12 d^3 \text {PolyLog}\left (3,-i e^{e+f x}\right )}{a f^4}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f} \]

[Out]

(d*x+c)^3/a/f-6*d*(d*x+c)^2*ln(1+I*exp(f*x+e))/a/f^2-12*d^2*(d*x+c)*polylog(2,-I*exp(f*x+e))/a/f^3+12*d^3*poly
log(3,-I*exp(f*x+e))/a/f^4+(d*x+c)^3*tanh(1/2*e+1/4*I*Pi+1/2*f*x)/a/f

________________________________________________________________________________________

Rubi [A]
time = 0.21, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3399, 4269, 3797, 2221, 2611, 2320, 6724} \begin {gather*} -\frac {12 d^2 (c+d x) \text {Li}_2\left (-i e^{e+f x}\right )}{a f^3}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{a f}+\frac {(c+d x)^3}{a f}+\frac {12 d^3 \text {Li}_3\left (-i e^{e+f x}\right )}{a f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^3/(a + I*a*Sinh[e + f*x]),x]

[Out]

(c + d*x)^3/(a*f) - (6*d*(c + d*x)^2*Log[1 + I*E^(e + f*x)])/(a*f^2) - (12*d^2*(c + d*x)*PolyLog[2, (-I)*E^(e
+ f*x)])/(a*f^3) + (12*d^3*PolyLog[3, (-I)*E^(e + f*x)])/(a*f^4) + ((c + d*x)^3*Tanh[e/2 + (I/4)*Pi + (f*x)/2]
)/(a*f)

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2611

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 3399

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 3797

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)], x_Symbol] :> Simp[(-I)*((
c + d*x)^(m + 1)/(d*(m + 1))), x] + Dist[2*I, Int[((c + d*x)^m*(E^(2*((-I)*e + f*fz*x))/(1 + E^(2*((-I)*e + f*
fz*x))/E^(2*I*k*Pi))))/E^(2*I*k*Pi), x], x] /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[4*k] && IGtQ[m, 0]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {(c+d x)^3}{a+i a \sinh (e+f x)} \, dx &=\frac {\int (c+d x)^3 \csc ^2\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right ) \, dx}{2 a}\\ &=\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}-\frac {(3 d) \int (c+d x)^2 \coth \left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=\frac {(c+d x)^3}{a f}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}-\frac {(6 i d) \int \frac {e^{2 \left (\frac {e}{2}+\frac {f x}{2}\right )} (c+d x)^2}{1+i e^{2 \left (\frac {e}{2}+\frac {f x}{2}\right )}} \, dx}{a f}\\ &=\frac {(c+d x)^3}{a f}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}+\frac {\left (12 d^2\right ) \int (c+d x) \log \left (1+i e^{2 \left (\frac {e}{2}+\frac {f x}{2}\right )}\right ) \, dx}{a f^2}\\ &=\frac {(c+d x)^3}{a f}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}-\frac {12 d^2 (c+d x) \text {Li}_2\left (-i e^{e+f x}\right )}{a f^3}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}+\frac {\left (12 d^3\right ) \int \text {Li}_2\left (-i e^{2 \left (\frac {e}{2}+\frac {f x}{2}\right )}\right ) \, dx}{a f^3}\\ &=\frac {(c+d x)^3}{a f}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}-\frac {12 d^2 (c+d x) \text {Li}_2\left (-i e^{e+f x}\right )}{a f^3}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}+\frac {\left (12 d^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{2 \left (\frac {e}{2}+\frac {f x}{2}\right )}\right )}{a f^4}\\ &=\frac {(c+d x)^3}{a f}-\frac {6 d (c+d x)^2 \log \left (1+i e^{e+f x}\right )}{a f^2}-\frac {12 d^2 (c+d x) \text {Li}_2\left (-i e^{e+f x}\right )}{a f^3}+\frac {12 d^3 \text {Li}_3\left (-i e^{e+f x}\right )}{a f^4}+\frac {(c+d x)^3 \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.96, size = 209, normalized size = 1.58 \begin {gather*} \frac {2 \left (\frac {d \left (f^2 \left (-i e^e f x \left (3 c^2+3 c d x+d^2 x^2\right )+3 \left (1+i e^e\right ) (c+d x)^2 \log \left (1+i e^{e+f x}\right )\right )+6 d \left (1+i e^e\right ) f (c+d x) \text {PolyLog}\left (2,-i e^{e+f x}\right )-6 i d^2 \left (-i+e^e\right ) \text {PolyLog}\left (3,-i e^{e+f x}\right )\right )}{-1-i e^e}+\frac {f^3 (c+d x)^3 \sinh \left (\frac {f x}{2}\right )}{\left (\cosh \left (\frac {e}{2}\right )+i \sinh \left (\frac {e}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (e+f x)\right )+i \sinh \left (\frac {1}{2} (e+f x)\right )\right )}\right )}{a f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^3/(a + I*a*Sinh[e + f*x]),x]

[Out]

(2*((d*(f^2*((-I)*E^e*f*x*(3*c^2 + 3*c*d*x + d^2*x^2) + 3*(1 + I*E^e)*(c + d*x)^2*Log[1 + I*E^(e + f*x)]) + 6*
d*(1 + I*E^e)*f*(c + d*x)*PolyLog[2, (-I)*E^(e + f*x)] - (6*I)*d^2*(-I + E^e)*PolyLog[3, (-I)*E^(e + f*x)]))/(
-1 - I*E^e) + (f^3*(c + d*x)^3*Sinh[(f*x)/2])/((Cosh[e/2] + I*Sinh[e/2])*(Cosh[(e + f*x)/2] + I*Sinh[(e + f*x)
/2]))))/(a*f^4)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 434 vs. \(2 (119 ) = 238\).
time = 1.24, size = 435, normalized size = 3.30

method result size
risch \(\frac {2 i \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right )}{f a \left ({\mathrm e}^{f x +e}-i\right )}+\frac {6 d^{2} c \,e^{2}}{a \,f^{3}}-\frac {4 d^{3} e^{3}}{a \,f^{4}}-\frac {6 d^{3} \ln \left (1+i {\mathrm e}^{f x +e}\right ) x^{2}}{a \,f^{2}}+\frac {6 d^{3} \ln \left (1+i {\mathrm e}^{f x +e}\right ) e^{2}}{a \,f^{4}}+\frac {6 d^{3} e^{2} \ln \left ({\mathrm e}^{f x +e}\right )}{a \,f^{4}}+\frac {12 d^{2} e c \ln \left ({\mathrm e}^{f x +e}-i\right )}{a \,f^{3}}+\frac {12 d^{2} c e x}{a \,f^{2}}+\frac {6 d^{2} c \,x^{2}}{a f}-\frac {12 d^{2} c \ln \left (1+i {\mathrm e}^{f x +e}\right ) x}{a \,f^{2}}-\frac {12 d^{2} c \ln \left (1+i {\mathrm e}^{f x +e}\right ) e}{a \,f^{3}}-\frac {12 d^{2} c \polylog \left (2, -i {\mathrm e}^{f x +e}\right )}{a \,f^{3}}-\frac {12 d^{2} e c \ln \left ({\mathrm e}^{f x +e}\right )}{a \,f^{3}}+\frac {12 d^{3} \polylog \left (3, -i {\mathrm e}^{f x +e}\right )}{a \,f^{4}}+\frac {6 d \ln \left ({\mathrm e}^{f x +e}\right ) c^{2}}{a \,f^{2}}-\frac {6 d^{3} e^{2} \ln \left ({\mathrm e}^{f x +e}-i\right )}{a \,f^{4}}-\frac {6 d^{3} e^{2} x}{a \,f^{3}}+\frac {2 d^{3} x^{3}}{a f}-\frac {6 d \ln \left ({\mathrm e}^{f x +e}-i\right ) c^{2}}{a \,f^{2}}-\frac {12 d^{3} \polylog \left (2, -i {\mathrm e}^{f x +e}\right ) x}{a \,f^{3}}\) \(435\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^3/(a+I*a*sinh(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

2*I*(d^3*x^3+3*c*d^2*x^2+3*c^2*d*x+c^3)/f/a/(exp(f*x+e)-I)+6/a/f^3*d^2*c*e^2-4/a/f^4*d^3*e^3-6/a/f^2*d^3*ln(1+
I*exp(f*x+e))*x^2+6/a/f^4*d^3*ln(1+I*exp(f*x+e))*e^2+6/a/f^4*d^3*e^2*ln(exp(f*x+e))+12/a/f^3*d^2*e*c*ln(exp(f*
x+e)-I)+12/a/f^2*d^2*c*e*x+6/a/f*d^2*c*x^2-12/a/f^2*d^2*c*ln(1+I*exp(f*x+e))*x-12/a/f^3*d^2*c*ln(1+I*exp(f*x+e
))*e-12/a/f^3*d^2*c*polylog(2,-I*exp(f*x+e))-12/a/f^3*d^2*e*c*ln(exp(f*x+e))+12*d^3*polylog(3,-I*exp(f*x+e))/a
/f^4+6/a/f^2*d*ln(exp(f*x+e))*c^2-6/a/f^4*d^3*e^2*ln(exp(f*x+e)-I)-6/a/f^3*d^3*e^2*x+2/a/f*d^3*x^3-6/a/f^2*d*l
n(exp(f*x+e)-I)*c^2-12/a/f^3*d^3*polylog(2,-I*exp(f*x+e))*x

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 249 vs. \(2 (118) = 236\).
time = 0.37, size = 249, normalized size = 1.89 \begin {gather*} 6 \, c^{2} d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} - i \, a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} - i\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} - \frac {2 \, c^{3}}{{\left (i \, a e^{\left (-f x - e\right )} - a\right )} f} - \frac {2 \, {\left (-i \, d^{3} x^{3} - 3 i \, c d^{2} x^{2}\right )}}{a f e^{\left (f x + e\right )} - i \, a f} - \frac {12 \, {\left (f x \log \left (i \, e^{\left (f x + e\right )} + 1\right ) + {\rm Li}_2\left (-i \, e^{\left (f x + e\right )}\right )\right )} c d^{2}}{a f^{3}} - \frac {6 \, {\left (f^{2} x^{2} \log \left (i \, e^{\left (f x + e\right )} + 1\right ) + 2 \, f x {\rm Li}_2\left (-i \, e^{\left (f x + e\right )}\right ) - 2 \, {\rm Li}_{3}(-i \, e^{\left (f x + e\right )})\right )} d^{3}}{a f^{4}} + \frac {2 \, {\left (d^{3} f^{3} x^{3} + 3 \, c d^{2} f^{3} x^{2}\right )}}{a f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*sinh(f*x+e)),x, algorithm="maxima")

[Out]

6*c^2*d*(x*e^(f*x + e)/(a*f*e^(f*x + e) - I*a*f) - log((e^(f*x + e) - I)*e^(-e))/(a*f^2)) - 2*c^3/((I*a*e^(-f*
x - e) - a)*f) - 2*(-I*d^3*x^3 - 3*I*c*d^2*x^2)/(a*f*e^(f*x + e) - I*a*f) - 12*(f*x*log(I*e^(f*x + e) + 1) + d
ilog(-I*e^(f*x + e)))*c*d^2/(a*f^3) - 6*(f^2*x^2*log(I*e^(f*x + e) + 1) + 2*f*x*dilog(-I*e^(f*x + e)) - 2*poly
log(3, -I*e^(f*x + e)))*d^3/(a*f^4) + 2*(d^3*f^3*x^3 + 3*c*d^2*f^3*x^2)/(a*f^4)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 372 vs. \(2 (118) = 236\).
time = 0.33, size = 372, normalized size = 2.82 \begin {gather*} -\frac {2 \, {\left (-i \, c^{3} f^{3} + 3 i \, c^{2} d f^{2} e - 3 i \, c d^{2} f e^{2} + i \, d^{3} e^{3} + 6 \, {\left (-i \, d^{3} f x - i \, c d^{2} f + {\left (d^{3} f x + c d^{2} f\right )} e^{\left (f x + e\right )}\right )} {\rm Li}_2\left (-i \, e^{\left (f x + e\right )}\right ) - {\left (d^{3} f^{3} x^{3} + 3 \, c d^{2} f^{3} x^{2} + 3 \, c^{2} d f^{3} x + 3 \, c^{2} d f^{2} e - 3 \, c d^{2} f e^{2} + d^{3} e^{3}\right )} e^{\left (f x + e\right )} + 3 \, {\left (-i \, c^{2} d f^{2} + 2 i \, c d^{2} f e - i \, d^{3} e^{2} + {\left (c^{2} d f^{2} - 2 \, c d^{2} f e + d^{3} e^{2}\right )} e^{\left (f x + e\right )}\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + 3 \, {\left (-i \, d^{3} f^{2} x^{2} - 2 i \, c d^{2} f^{2} x - 2 i \, c d^{2} f e + i \, d^{3} e^{2} + {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + 2 \, c d^{2} f e - d^{3} e^{2}\right )} e^{\left (f x + e\right )}\right )} \log \left (i \, e^{\left (f x + e\right )} + 1\right ) - 6 \, {\left (d^{3} e^{\left (f x + e\right )} - i \, d^{3}\right )} {\rm polylog}\left (3, -i \, e^{\left (f x + e\right )}\right )\right )}}{a f^{4} e^{\left (f x + e\right )} - i \, a f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*sinh(f*x+e)),x, algorithm="fricas")

[Out]

-2*(-I*c^3*f^3 + 3*I*c^2*d*f^2*e - 3*I*c*d^2*f*e^2 + I*d^3*e^3 + 6*(-I*d^3*f*x - I*c*d^2*f + (d^3*f*x + c*d^2*
f)*e^(f*x + e))*dilog(-I*e^(f*x + e)) - (d^3*f^3*x^3 + 3*c*d^2*f^3*x^2 + 3*c^2*d*f^3*x + 3*c^2*d*f^2*e - 3*c*d
^2*f*e^2 + d^3*e^3)*e^(f*x + e) + 3*(-I*c^2*d*f^2 + 2*I*c*d^2*f*e - I*d^3*e^2 + (c^2*d*f^2 - 2*c*d^2*f*e + d^3
*e^2)*e^(f*x + e))*log(e^(f*x + e) - I) + 3*(-I*d^3*f^2*x^2 - 2*I*c*d^2*f^2*x - 2*I*c*d^2*f*e + I*d^3*e^2 + (d
^3*f^2*x^2 + 2*c*d^2*f^2*x + 2*c*d^2*f*e - d^3*e^2)*e^(f*x + e))*log(I*e^(f*x + e) + 1) - 6*(d^3*e^(f*x + e) -
 I*d^3)*polylog(3, -I*e^(f*x + e)))/(a*f^4*e^(f*x + e) - I*a*f^4)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {2 i c^{3} + 6 i c^{2} d x + 6 i c d^{2} x^{2} + 2 i d^{3} x^{3}}{a f e^{e} e^{f x} - i a f} - \frac {6 i d \left (\int \frac {c^{2}}{e^{e} e^{f x} - i}\, dx + \int \frac {d^{2} x^{2}}{e^{e} e^{f x} - i}\, dx + \int \frac {2 c d x}{e^{e} e^{f x} - i}\, dx\right )}{a f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**3/(a+I*a*sinh(f*x+e)),x)

[Out]

(2*I*c**3 + 6*I*c**2*d*x + 6*I*c*d**2*x**2 + 2*I*d**3*x**3)/(a*f*exp(e)*exp(f*x) - I*a*f) - 6*I*d*(Integral(c*
*2/(exp(e)*exp(f*x) - I), x) + Integral(d**2*x**2/(exp(e)*exp(f*x) - I), x) + Integral(2*c*d*x/(exp(e)*exp(f*x
) - I), x))/(a*f)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3/(a+I*a*sinh(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)^3/(I*a*sinh(f*x + e) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^3}{a+a\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)^3/(a + a*sinh(e + f*x)*1i),x)

[Out]

int((c + d*x)^3/(a + a*sinh(e + f*x)*1i), x)

________________________________________________________________________________________